<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// MISS
Route::miss(Url(''));

// 首页
Route::get('', 'index/Index/index');
// 公司简介
Route::get('/company', 'index/Company/index');
Route::get('/company/:classify_index', 'index/Company/index')->validate(['classify_index' => 'number|in:1,2,3']);
// 新闻中心
Route::get('/news', 'index/News/index');
Route::get('/news/:id', 'index/News/read')->validate(['id' => 'require|number']);
// 产品中心
Route::get('/products', 'index/Products/index');
Route::get('/products/:id', 'index/Products/read')->validate(['id' => 'require|number']);
// 工作机会
Route::get('/work', 'index/Work/index');
// 联系我们
Route::get('/contact', 'index/Contact/index');

// 后台
// 验证码
Route::get(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/login/verify', 'admin/Login/verify');
// 登录
Route::get(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/login', 'admin/Login/index');
Route::post(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/login', 'admin/Login/login');
// 退出登录
Route::get(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/logout', 'admin/Login/logout');
// 首页
Route::get('/' . Env::get('ROUTER.ADMIN', 'mykongqineng'), 'admin/Index/index');
Route::get('/' . Env::get('ROUTER.ADMIN', 'mykongqineng') . 'removeruntime', 'admin/Index/remove_runtime');
// 管理员
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin', 'admin/Admin');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin', 'admin/Admin/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin/:id', 'admin/Admin/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin/:id', 'admin/Admin/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin/status/:id', 'admin/Admin/update_status')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/admin/modifypassword/:id', 'admin/Admin/modify_password')->validate(['id' => 'require|number']);
// 导航栏
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav', 'admin/Nav');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav', 'admin/Nav/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav/:id', 'admin/Nav/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav/:id', 'admin/Nav/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav/sorting/:id', 'admin/Nav/update_sorting')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/nav/status/:id', 'admin/Nav/update_status')->validate(['id' => 'require|number']);
// 轮播图
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure', 'admin/CarouselFigure');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure', 'admin/CarouselFigure/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure/:id', 'admin/CarouselFigure/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure/:id', 'admin/CarouselFigure/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure/sorting/:id', 'admin/CarouselFigure/update_sorting')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure/status/:id', 'admin/CarouselFigure/update_status')->validate(['id' => 'require|number']);
Route::post(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/carouselfigure/upload', 'admin/CarouselFigure/upload');
// 产品
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products', 'admin/Products');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products', 'admin/Products/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products/:id', 'admin/Products/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products/:id', 'admin/Products/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products/sorting/:id', 'admin/Products/update_sorting')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products/status/:id', 'admin/Products/update_status')->validate(['id' => 'require|number']);
Route::post(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/products/upload', 'admin/Products/upload');
// 新闻
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news', 'admin/News');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news', 'admin/News/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news/:id', 'admin/News/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news/:id', 'admin/News/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news/sorting/:id', 'admin/News/update_sorting')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news/status/:id', 'admin/News/update_status')->validate(['id' => 'require|number']);
Route::post(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/news/upload', 'admin/News/upload');
// 友情链接
Route::resource(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink', 'admin/FriendshipLink');
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink', 'admin/FriendshipLink/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink/:id', 'admin/FriendshipLink/update')->validate(['id' => 'require|number']);
Route::delete(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink/:id', 'admin/FriendshipLink/delete')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink/sorting/:id', 'admin/FriendshipLink/update_sorting')->validate(['id' => 'require|number']);
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/friendshiplink/status/:id', 'admin/FriendshipLink/update_status')->validate(['id' => 'require|number']);
// 基本信息
Route::rule(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/web', 'admin/Web/index');
Route::put(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/web', 'admin/Web/update');
Route::post(Env::get('ROUTER.ADMIN', 'mykongqineng') . '/web/upload', 'admin/Web/upload');

return [

];
